<template>
  <uni-easyinput placeholder="请输入内容" :inputBorder="true" v-model="curValue"></uni-easyinput>
</template>
<script setup lang="ts">
const props = defineProps({
  name: {
    type: String,
  },
  value: {
    type: [String, Number],
  },
  disabled: {
    type: Boolean,
    default: false,
  },
  readOnly: {
    type: Boolean,
    default: false,
  },
  placeholder: {
    type: String,
  },
})
const emit = defineEmits(['change'])

const curValue = computed({
  get(): string | number {
    return props.value as string
  },
  set(value: string | number) {
    change(value)
  },
})
const change = (value: string | number) => {
  emit('change', value)
}
</script>
